<!DOCTYPE html>
<html>
<head>
    <title>应收单表</title>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="Author" content="larry" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../statics/common/cascader/cascader/cascader.css" media="all">
    <link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/autocomplete.css">
    <link rel="stylesheet" type="text/css" href="../../statics/common/layui/css/soulTable.css">
    <link rel="stylesheet" type="text/css" href="../../statics/plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" type="text/css" href="../../statics/css/common.css">
    <link rel="stylesheet" type="text/css" href="../../statics/css/font-awesome-4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../statics/css/list-search-table.css">
    <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui-soul-table/docs/soulTable.css" media="all"/>-->
    <script type="text/javascript" src="../../statics/plugins/jquery.min.js"></script>
    <script type="text/javascript" src="../../statics/common/lib/vue.min.js"></script>
    <script type="text/javascript" src="../../statics/plugins/ztree/jquery.ztree.all.min.js"></script>
    <script type="text/javascript" src="../../statics/common/layui/layui.all.js"></script>
    <script type="text/javascript" src="../../statics/common/js/axios.min.js"></script>
    <script type="text/javascript" src="../../statics/common/js/xm-select.js"></script>
    <script type="text/javascript" src="../../statics/js/common.js"></script>
    <script type="text/javascript" src="../../statics/js/upload.js"></script>
    <script type="text/javascript" src="../../statics/common/step/steps.js"></script>
    <link rel="stylesheet" href="../../statics/css/jxcPublicAll.css"  media="all">
    <link href="../../statics/common/photoviewer/dist/photoviewer.css" rel="stylesheet">
    <link rel="stylesheet" href="../../statics/common/step/steps.css">
    <!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.css" media="all">-->
    <link rel="stylesheet" href="../../statics/js/modules/cropper/cropper.css" media="all">
    <link rel="stylesheet" type="text/css" href="../../statics/css/viewer.min.css">
    <!--<script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.7/cropper.min.js"></script>-->
    <script src="../../statics/js/modules/cropper/cropper.min.js"></script>
    <script src="../../statics/common/photoviewer/dist/photoviewer.js"></script>
    <script src="../../statics/common/layui/autocomplete.js"></script>
    <script  src="../../statics/js/modules/viewer/viewer.min.js"></script>
    <script src="../../statics/common/print-js/print.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../../statics/common/print-js/print.min.css">
    <script type="text/javascript" src="../../statics/common/xmselect/xm-select.js"></script>
    <script type="text/javascript" src="../../statics/js/searchview.js"></script>
    <script type="text/javascript" src="../../statics/js/tableedit.js"></script>

    <!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.0&type=webgl&ak=eo4XeZhRKHsQ0NOe6u6NkKscmRsk416B"></script>-->

    <!-- 引入组件库 -->
    <link rel="stylesheet" type="text/css" href="../../statics/css/index.css">






</head>
<body class="ren-body">
<div id="rrapp" v-cloak>

    <div class="list-header-content-box">
        <div class="list-header-card display">
            <!--<div
                    v-for="(item, index) in statusCar"
                    :key="index"
                    class="flex" :class="index === statusCarIndex ? 'active' : ''" @click="changeStatus(item,index)" style="cursor:pointer;">
                <div class="list-header-card-text">{{item.name}}</div>
                <div class="list-header-card-number">{{item.carNum}}</div>
            </div>-->


            <div class="flex" :class="q.status === -9 ? 'active' : ''" @click="changeStatus(-9)"  style="cursor:pointer;"   >
                <div class="list-header-card-text" >应收账款总金额</div>
                <div class="list-header-card-number">￥{{receivableAmounts}}</div>
            </div>
            <div class="flex" :class="q.status === 1 ? 'active' : ''" @click="changeStatus(1)"  style="cursor:pointer;"  >
                <div class="list-header-card-text" >待收账款总金额</div>
                <div class="list-header-card-number">￥{{uncollectedAmount}}</div>
            </div>
            <div class="flex" :class="q.status === 2 ? 'active' : ''" @click="changeStatus(2)" style="cursor:pointer;" >
                <div class="list-header-card-text">已收账款总金额</div>
                <div class="list-header-card-number">￥{{receivedAmounts}}</div>
            </div>
            <div class="flex" :class="q.status === 3 ? 'active' : ''" @click="changeStatus(3)" style="cursor:pointer;" >
                <div class="list-header-card-text">待追账款总金额</div>
                <div class="list-header-card-number">￥{{chasingAmount}}</div>
            </div>
            <div class="flex" :class="q.status === 4 ? 'active' : ''" @click="changeStatus(4)" style="cursor:pointer;" >
                <div class="list-header-card-text">已坏账款总金额</div>
                <div class="list-header-card-number">￥{{badAmount}}</div>
            </div>
            <div class="flex" :class="q.status === 5 ? 'active' : ''" @click="changeStatus(5)" style="cursor:pointer;">
                <div class="list-header-card-text">账单作废总金额</div>
                <div class="list-header-card-number">￥{{nullifyAmount}}</div>
            </div>
        </div>
    </div>

    <div class="list-search-title-box">
        <form class="layui-form" style="box-shadow: 0 0 20px #eee;padding-right: 15px;">
            <section class="jxc-section" style="display: flex;align-items: flex-start;white-space: nowrap;">
                <div class="card layui-row" style="flex: 1">
                    <div class="layui-form-item ">
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">车牌号/车架号</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input searchVal" v-model="q.carPlateNo"
                                       placeholder="请输入车牌号/车架号"/>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">品牌/车系/车型:</label>
                            <div class="layui-input-inline">
                                <input type="text" id="carBrandSeriesModel"  class="layui-input" placeholder="请选择品牌/车系/车型" readonly="readonly"/>
                            </div>
                        </div>

                        <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                            <label class="layui-form-label">客户/渠道名称</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input searchVal" v-model="q.customerName"
                                       placeholder="请输入客户/渠道名称"/>
                            </div>
                        </div>
                        <section v-show="isFilter">
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">订单编号</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input searchVal" v-model="q.businessNo"
                                           placeholder="请输入订单编号"/>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">期数</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input searchVal" v-model="q.stage"
                                           placeholder="请输入期数"/>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">租赁类型</label>
                                <div class="layui-input-inline">
                                    <select  lay-filter="rentType" v-model="q.rentType">
                                        <option value="">全部</option>
                                        <option value=1>经租</option>
                                        <option value=2>以租代购</option>
                                        <option value=3>展示车</option>
                                        <option value=4>试驾车</option>
                                        <option value=5>融租</option>
                                        <option value=6>直购</option>
                                        <option value=7>活动订单</option>
                                        <option value=8>挂靠</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">应收单号</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input searchVal" v-model="q.receivablesNo"
                                           placeholder="请输入应收单号"/>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs6">
                                <label class="layui-form-label">渠道商:</label>
                                <div class="layui-input-inline">
                                    <select  lay-filter="channelSelect"  v-model="q.channelId">
                                        <option value="">请选择渠道商</option>
                                        <option v-for="item in channelList" :value="item.channelId">{{item.channelName}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">月租金付款方式</label>
                                <div class="layui-input-inline">
                                    <select  lay-filter="paymentMethod" v-model="q.paymentMethod">
                                        <option value="">全部</option>
                                        <option value=7>日付</option>
                                        <option value=8>周付</option>
                                        <option value=1>月付</option>
                                        <option value=2>两月付</option>
                                        <option value=3>季付</option>
                                        <option value=6>半年付</option>
                                        <option value=4>年付</option>
                                        <option value=5>一次性付款</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">收款类型</label>
                                <div class="layui-input-inline">
                                    <select  lay-filter="collectionType" v-model="q.collectionType">
                                        <option value="">全部</option>
                                        <option value=0>其他</option>
                                        <option value=1>保证金</option>
                                        <option value=2>租金</option>
                                        <option value=3>首付款</option>
                                        <option value=4>退车结算款</option>
                                        <option value=5>换车结算款</option>
                                        <option value=6>备用车结算款</option>
                                        <option value=7>整备费</option>
                                        <option value=8>尾款</option>
                                        <option value=9>定金</option>
                                        <option value=10>其他费用</option>
                                        <option value=11>车辆总单价</option>
                                        <option value=12>挂靠费</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">付款方类型</label>
                                <div class="layui-input-inline">
                                    <select  lay-filter="customerType" v-model="q.customerType">
                                        <option value="">全部</option>
                                        <option value=1>客户/企业</option>
                                        <option value=2>客户/个人</option>
                                        <option value=3>渠道/个人</option>
                                        <option value=4>渠道/企业</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">合同编号</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input searchVal" v-model="q.contractNo"
                                           placeholder="请输入合同编号"/>
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4 layui-col-sm6 layui-col-xs12">
                                <label class="layui-form-label">出租方</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input searchVal" style="cursor:pointer;"
                                           @click="deptTree"  v-model="q.leaseName" readonly
                                           placeholder="请选择出租方"/>
                                </div>
                            </div>
                            <div class=" flex-box layui-inline layui-col-md12 layui-col-sm12 layui-col-xs12">
                                <label class="layui-form-label">应收时间:</label>
                                <div class="list-search-sup-title new-layui-title">
                                    <div class="list-search-sup-title new-layui-title">
                                        <div class="task-content-box-tab">
                                            <div class="display task-content-box-tab layui-col-md8 layui-col-sm8 layui-col-xs12" type="receivableDateType">
                                                <div value="0" class="layui-col-md2 layui-col-sm2 layui-col-xs2">昨天</div>
                                                <div value="1" class="layui-col-md2 layui-col-sm2 layui-col-xs2">今日</div>
                                                <div value="2" class="layui-col-md2 layui-col-sm2 layui-col-xs2">上周</div>
                                                <div value="3" class="layui-col-md2 layui-col-sm2 layui-col-xs2">本周</div>
                                                <div value="4" class="layui-col-md2 layui-col-sm2 layui-col-xs2">上月</div>
                                                <div value="5" class="layui-col-md2 layui-col-sm2 layui-col-xs2">本月</div>
                                                <div value="6" class="layui-col-md2 layui-col-sm2 layui-col-xs2">本季</div>
                                                <div value="7" class="layui-col-md2 layui-col-sm2 layui-col-xs2">本年</div>
                                            </div>
                                            <div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
                                                <input type="text" class="layui-input" id="receivableDateStr" v-model="q.receivableDateStr" readonly placeholder="选择日期范围" style="width: 300px;" autocomplete="off">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class=" flex-box layui-inline layui-col-md12 layui-col-sm12 layui-col-xs12">
                                <label class="layui-form-label">实收时间:</label>
                                <div class="list-search-sup-title new-layui-title">
                                    <div class="task-content-box-tab">
                                        <div class="display task-content-box-tab layui-col-md8 layui-col-sm8 layui-col-xs12" type="actualDateType">
                                            <div value="0" class="layui-col-md2 layui-col-sm2 layui-col-xs2">昨天</div>
                                            <div value="1" class="layui-col-md2 layui-col-sm2 layui-col-xs2">今天</div>
                                            <div value="2" class="layui-col-md2 layui-col-sm2 layui-col-xs2">上周</div>
                                            <div value="3" class="layui-col-md2 layui-col-sm2 layui-col-xs2">本周</div>
                                            <div value="4" class="layui-col-md2 layui-col-sm2 layui-col-xs2">上月</div>
                                            <div value="5" class="layui-col-md2 layui-col-sm2 layui-col-xs2">本月</div>
                                            <div value="6" class="layui-col-md2 layui-col-sm2 layui-col-xs2">本季</div>
                                            <div value="7" class="layui-col-md2 layui-col-sm2 layui-col-xs2">本年</div>
                                        </div>
                                        <div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
                                            <input type="text" class="layui-input" id="actualDateStr" v-model="q.actualDateStr" readonly placeholder="选择日期范围" style="width: 300px;" autocomplete="off">
                                        </div>
                                    </div>
                                </div>
                            </div>


                        </section>
                    </div>
                </div>
                <div style="display: flex;align-items: center;">
                    <a class="layui-btn search-btn" @click="query" id="query">查询</a>
                    <a class="layui-btn reset-btn" @click="reset">重置</a>
                    <!--查询重置按钮-->
                    <div @click="bindFilter" style="margin-left: 10px;cursor: pointer;user-select: none;">
                        <span style="color: #2251C5;">高级筛选</span>
                        <img src="../../../statics/images/高级筛选@2x.png" style="width:14px">
                    </div>
                </div>
            </section>
        </form>
    </div>
    <div class="list-search-title-box">
        <form class="layui-form">
            <div style="display:flex;width: 100%;">
                <div class="layui-form-item layui-row" style="width: 100%;">
                    <div class="list-search-form-button" style="width: 100%;">
                        <!--除查询重置外其余按钮-->
                        <a class="layui-btn reset-btn" @click="add(1)" v-m-perm="['financial:receivables:save']">新增应收</a>
                        <a class="layui-btn reset-btn" @click="add(2)" v-m-perm="['financial:receivables:save']">新增已收</a>
                        <a class="layui-btn reset-btn" @click="exports" v-m-perm="['financial:receivables:export']">导出</a>
                        <a class="layui-btn reset-btn" @click="yjsk" v-m-perm="['financial:receivables:yjsk']" v-show="statusIndex == 1 || statusIndex == 3">一键收款</a>
                        <a class="layui-btn reset-btn" @click="dealChasing" v-m-perm="['financial:receivables:dealChasing']" v-show="statusIndex == 1">待追帐</a>
                        <a class="layui-btn reset-btn" @click="yjzf" v-m-perm="['financial:receivables:yjzf']" v-show="statusIndex == 1 || statusIndex == 3">一键作废</a>
                        <a class="layui-btn reset-btn" @click="dealBadBill" v-m-perm="['financial:receivables:dealBadCount']" v-show="statusIndex == 1">坏账</a>
                        <a class="layui-btn reset-btn" id="batchImportReceivables" v-m-perm="['financial:receivables:yjsk']" v-show="statusIndex == 1 || statusIndex == 3">批量收款</a>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <table class="layui-hide" id="grid" lay-filter="grid"></table>

    <!-- 表单 -->
    <form v-show="showForm" class="layui-form ren-form" id="editForm">
        <div class="form-content-box">
            <div class="list-search-sup-title new-layui-title border-bottom-dashed">
                {{title}}
            </div>
            <div class="form-content-session-box">
                <div class="card">
                    <div class="layui-row layui-form-row-content">
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">收款类型:</label>
                            <div class="layui-input-inline">
                                <input
                                        type="text"
                                        class="layui-input searchVal"
                                        lay-verify="required"
                                        v-model="receivables.collectionTypeName"
                                        placeholder="请输入收款类型" />
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">收款状态:</label>
                            <div class="layui-input-inline">
                                <span>{{status}}</span>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">车牌号:</label>
                            <div class="layui-input-inline">
                                <input
                                        type="text"
                                        class="layui-input searchVal"
                                        @click="selectCar"
                                        lay-verify="required"
                                        v-model="receivables.carPlateNo"
                                        placeholder="选择车牌号" />
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">车架号:</label>
                            <div class="layui-input-inline">
                                <input
                                        type="text"
                                        class="layui-input searchVal"
                                        @click="selectCar"
                                        lay-verify="required"
                                        v-model="receivables.vin"
                                        placeholder="选择车架号" />
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">车辆状态:</label>
                            <div class="layui-input-inline">
                                <input
                                        type="text"
                                        class="layui-input searchVal"
                                        v-model="receivables.carStatusShow"
                                        placeholder="自动获取"
                                        disabled/>
                            </div>

                        </div>
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">车辆订单号:</label>
                            <div class="layui-input-inline">
                                <input
                                        type="text"
                                        class="layui-input searchVal"
                                        v-model="receivables.carOrderNo"
                                        placeholder="自动获取"
                                        disabled/>
                            </div>

                        </div>
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">付款方*:</label>
                            <div class="layui-input-inline">
                                <input name="radioCustomer" lay-filter="radioCustomer" type="radio" value=5 title="客户" v-model="receivables.customerType">
                                <input name="radioCustomer" lay-filter="radioCustomer" type="radio" value=6 title="渠道商" v-model="receivables.customerType">
                                <div v-show="qudaoShow">
                                    <select id="customer" name="customer" lay-filter="customer"  v-model="receivables.customerId">
                                        <option value="">请选择付款方</option>
                                    </select>
                                </div>
                               <div v-show="kehuShow">
                                   <input  id="carNo"   @click="selectCustomer" type="text"  v-model="customer.customerName" class="layui-input searchVal"  placeholder="请选择客户信息" readonly/>
                               </div>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">{{dateLabel}}*:</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" lay-verify="required" id="receivableDateForm" v-model="receivables.receivableDate"  placeholder="请选择日期">
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md6 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">{{amountLabel}}*:</label>
                            <div class="layui-input-inline">
                                <input
                                        type="text"
                                        class="layui-input searchVal"
                                        lay-verify="required"
                                        v-model="receivables.amount"
                                        oninput="value=moneyInput(value)"
                                        placeholder="请输入金额" />
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md12 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">备注:</label>
                            <div class="layui-input-inline">
                                <textarea placeholder="如果需要备注，请记录备注信息" class="layui-textarea" name="desc" v-model="receivables.remarks"></textarea>
                            </div>
                        </div>
                        <div class="layui-inline layui-col-md12 layui-col-sm6 layui-col-xs6">
                            <label class="layui-form-label">附件:</label>
                            <div class="layui-input-inline">
                                <div class="layui-input-inline-upload">
                                    <div :id="deliveryFileLstId" class="layui-input-inline-upload-show box-rect"
                                         v-for="(item,index) in deliveryFileLst">
                                        <div v-show="item.typeFile == 1" class="layui-input-inline-upload-button">
                                            <img :src="imageURL + item.url" class="view-img">
                                        </div>
                                        <div v-show="item.typeFile != 1" class="layui-input-inline-upload-button">
                                            {{item.nameAccessory}}
                                        </div>
                                        <div class="layui-input-inline-upload-show-delete btn-event"
                                             @click="delDeliveryFile(item.id)">
                                            删除
                                        </div>
                                    </div>
                                    <div class="layui-input-inline-upload-button box-rect box-rect-event"
                                         id="addDeliveryFile">
                                        <img src="../../statics/images/inline-upload@2x.png">
                                    </div>
                                </div>
                                <div class="layui-input-inline-upload-text" style="padding-bottom: 10px">附件说明：附件最大支持50M，
                                    <br/>
                                    支持格式：PDF、Word、Excel、JPG、PNG 、ZIP、RAR
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="float-btn-group">
            <a class="layui-btn reset-btn" @click="cancel">取消</a>
            <a class="layui-btn search-btn" lay-submit lay-filter="saveOrUpdate">保存</a>
        </div>
    </form>


    <!-- 收款 -->
    <form v-show="showForm" class="layui-form ren-form" id="collectionskForm">
        <div class="layui-form-item">
            <label class="layui-form-label">应收编号</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.receivablesNo" autocomplete="off" placeholder="应收编号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">合同编号</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.contractNo" autocomplete="off" placeholder="合同编号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">订单编号：业务系统订单号</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.businessNo" autocomplete="off" placeholder="订单编号：业务系统订单号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态:1、待收款，2、已收款</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.status" autocomplete="off" placeholder="状态:1、待收款，2、已收款" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">售卖方ID</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.leaseId" autocomplete="off" placeholder="售卖方ID" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">售卖方名称</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.leaseName" autocomplete="off" placeholder="售卖方名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">客户ID</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.customerId" autocomplete="off" placeholder="客户ID" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">客户名称</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.customerName" autocomplete="off" placeholder="客户名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">客户类型:1、客户/企业，2、客户/个人，3、渠道/个人，4、渠道/企业</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.customerType" autocomplete="off" placeholder="客户类型:1、客户/企业，2、客户/个人，3、渠道/个人，4、渠道/企业" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车牌号</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.carPlateNo" autocomplete="off" placeholder="车牌号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车架号</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.vin" autocomplete="off" placeholder="车架号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">品牌名称</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.brandName" autocomplete="off" placeholder="品牌名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车系名称</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.seriesName" autocomplete="off" placeholder="车系名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车型名称</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.modelName" autocomplete="off" placeholder="车型名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">付款方式：0、全部，1、月付，2、两月付，3、季付，4、年付一次性付款</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.paymentMethod" autocomplete="off" placeholder="付款方式：0、全部，1、月付，2、两月付，3、季付，4、年付一次性付款" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">收款类型：0、全部，1、保证金，2、租金，3、首付款，4、退车结算款，5、换车结算款，6、备用车结算款</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.collectionType" autocomplete="off" placeholder="收款类型：0、全部，1、保证金，2、租金，3、首付款，4、退车结算款，5、换车结算款，6、备用车结算款" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">期数</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.stage" autocomplete="off" placeholder="期数" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">应收金额</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.receivableAmount" autocomplete="off" placeholder="应收金额" oninput="value=moneyInput(value)" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">已收金额</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.receivedAmount" autocomplete="off" placeholder="已收金额" oninput="value=moneyInput(value)" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">待收金额</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.uncollectedAmount" autocomplete="off" placeholder="待收金额" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">逾期天数</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.overdueDays" autocomplete="off" placeholder="逾期天数" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" v-model="receivables.remarks" autocomplete="off" placeholder="备注" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="saveOrUpdate">确定</button>
            </div>
        </div>
    </form>

    <form v-show="showForm2" class="layui-form ren-form" id="editForm2">
        <div class="layui-row layui-form-row-content">
            <div class="layui-inline layui-col-md12 layui-col-sm12 layui-col-xs12">
                <label class="layui-form-label">修改后的账单金额:</label>
                <div class="layui-input-inline">
                    <input
                            type="text"
                            class="layui-input searchVal"
                            lay-verify="required"
                            oninput="editSimple(this, 'num', '99999999.99')"
                            v-model="receivables.receivableAmount"
                            placeholder="请输入修改后的账单金额" />
                </div>
            </div>
            <div class="layui-inline layui-col-md12 layui-col-sm12 layui-col-xs12">
                <label class="layui-form-label">修改原因:</label>
                <div class="layui-input-inline">
                    <textarea v-model="receivables.modifyReason" maxlength="200"
                              placeholder="请输入修改原因" class="layui-textarea"></textarea>
                </div>
            </div>
        </div>
        <div class="float-btn-group"  style="width: 30%;left: 35%; margin-bottom: 190px;">
            <a class="layui-btn reset-btn" @click="cancel">取消</a>
            <a class="layui-btn search-btn" lay-submit lay-filter="saveOrUpdate2">保存</a>
        </div>
    </form>



</div>

<!--操作-->
<script type="text/html" id="barTpl">

    <a class="layui-grid-btn-xs" lay-event="detail" v-m-perm="['financial:receivables:update']" more-btn-index="{{d.LAY_INDEX-1}}">详情</a>
    {{#if(d.orderStatus == 0){}}
    {{#if(d.status == 1 || d.status == 3 || d.status == 9){}}
    <a class="layui-grid-btn-xs" lay-event="collectionsk" v-m-perm="['financial:receivables:update']" more-btn-index="{{d.LAY_INDEX-1}}">收款</a>
    {{# }}}
    {{# }}}

    {{#if(d.orderStatus == 0){}}
    {{#if(d.status == 1 || d.status == 2){}}
    <a class="layui-grid-btn-xs" lay-event="receivabledit" v-m-perm="['financial:receivables:update']" more-btn-index="{{d.LAY_INDEX-1}}">编辑</a>
    {{# }}}
    {{# }}}

    {{#if(d.repaymentMethod == 3 && (d.status == 1 || d.status == 8 || d.status == 9) && d.orderStatus==0){}}
    <a class="layui-grid-btn-xs" lay-event="applyWithHold" v-m-perm="['financial:receivables:update']" more-btn-index="{{d.LAY_INDEX-1}}">发起代扣</a>
    {{# }}}

    {{#if(d.status == 3 && d.orderStatus==0){}}
    <a class="layui-grid-btn-xs" lay-event="delChasingBz" v-m-perm="['financial:receivables:update']" more-btn-index="{{d.LAY_INDEX-1}}">备注</a>
    {{# }}}
    {{#if(d.status == 4 && d.orderStatus==0){}}
    <a class="layui-grid-btn-xs" lay-event="delBadBz" v-m-perm="['financial:receivables:update']" more-btn-index="{{d.LAY_INDEX-1}}">备注</a>
    {{# }}}
</script>

<script type="text/html" id="checkbd">
    {{#  if(d.status ==2 || d.status ==4 || d.status ==5){ }}
    <input type="checkbox" name="siam_one" title="" lay-filter='siam_one' lay-skin="primary" data-contractId = "{{ d.receivablesNo }}" data-id = "{{ d.receivablesId }}" disabled>
    {{#  } }}
    {{#  if(d.status ==1 || d.status ==3){ }}
    {{#if(d.orderStatus == 0){}}
    <input type="checkbox" name="siam_one" title="" lay-filter='siam_one' lay-skin="primary" data-contractId = "{{ d.receivablesNo }}" data-id = "{{ d.receivablesId }}" {{ d.LAY_CHECKED == 1 ? 'checked' : '' }}>
    {{#} else { }}
    <input type="checkbox" name="siam_one" title="" lay-filter='siam_one' lay-skin="primary" data-contractId = "{{ d.receivablesNo }}" data-id = "{{ d.receivablesId }}" disabled>
    {{# }}}
    {{#  } }}
</script>

<script src="../../statics/js/modules/financial/receivables.js?_${.now?long}"></script>
</body>
</html>
